home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 11375 < prev    next >
Encoding:
Text File  |  1996-08-05  |  949 b   |  52 lines

  1. Path: badger.wmin.ac.uk!darec
  2. From: darec@westminster.ac.uk (Nadarajah Thavaneethan)
  3. Newsgroups: comp.lang.c
  4. Subject: Please help me
  5. Date: 23 Mar 1996 15:33:27 GMT
  6. Organization: University of Westminster
  7. Message-ID: <4j15k7$j2c@badger.wmin.ac.uk>
  8. NNTP-Posting-Host: badger.wmin.ac.uk
  9. X-Newsreader: TIN [version 1.2 PL2]
  10.  
  11. #include <stdio.h>
  12. #include <stdlib.h>
  13. #define SIZE 60
  14.  
  15.  
  16. void main(void)
  17. {
  18. int i;
  19. char rest[80];
  20.    
  21.      printf("Enter line ");
  22.      scanf("%s", rest);
  23.      printf("Enter size of new lines ");
  24.      scanf("%d", i);
  25.      index = 0;
  26.      writelines(rest, i);
  27.  
  28. }
  29.  
  30. void writelines( char r[], int len)
  31. {
  32. int i;
  33.         while (index < 80) {
  34.      for  (i=0; i<len; i++)
  35.     {
  36.          putchar(r[index]);
  37.          putchar('\n');
  38.         }
  39.          index++;
  40. }
  41. }
  42.  
  43. This program reads a line of data and sorts it into ascending ASCII sequence
  44. it doesn't but it should !.
  45.  
  46. please mail me   
  47.   darec@westminster.ac.uk
  48.  
  49. Thanks in Advance...
  50.  
  51.  
  52.